/**
 * @version $Revision: 22 $
 * @author $Author: andrew.stephanoff@gmail.com $ $Date: 2010-12-24 08:39:32 +0000 (Fri, 24 Dec 2010) $
 */
require('net').createServer(function(stream){
    stream.on('data', function(data){
        if (-1 < data.indexOf('policy-file-request')) {
            stream.write('<?xml version="1.0"?>\n');
            stream.write('<!DOCTYPE cross-domain-policy SYSTEM "http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd">\n');
            stream.write('<cross-domain-policy>\n');
            stream.write('<allow-access-from domain="*" to-ports="*"/>\n');
            stream.write('</cross-domain-policy>\n');
            stream.end();
        }
    });
}).listen(843);
